
package com.seekting.study;

public class MostVisit {
    public interface MostVisitTable {
        public static final String CREATE_TABLE = "create table if not exists";
        public static final String TYPE_TEXT = "text";
        public static final String TYPE_INTEGER = "integer";
        public static final String TYPE_TIMESTAMP = "timestamp";

        public String TABLE_NAME = "most_visit";
        public String ID = "_id";
        public String COLUMN_TITLE = "title";
        public String COLUMN_CREATE_TIME = "create_time";
        public String COLUMN_LAST_VISIT_TIME = "last_visit_time";
        public String COLUMN_VISIT_COUNT = "visit_count";
        public String COLUMN_URL = "url";
        public String COLUMN_HOST = "host";

        public static final String schema = String
                .format(
                        "%s %s (%s %s, %s %s, %s %s, %s %s, %s %s, %s %s, %s %s);",
                        CREATE_TABLE,
                        TABLE_NAME,
                        ID, "INTEGER PRIMARY KEY AUTOINCREMENT", COLUMN_TITLE, TYPE_TEXT,
                        COLUMN_CREATE_TIME,
                        TYPE_TIMESTAMP, COLUMN_LAST_VISIT_TIME, TYPE_TIMESTAMP,
                        COLUMN_VISIT_COUNT, TYPE_INTEGER, COLUMN_URL, TYPE_TEXT, COLUMN_HOST,
                        TYPE_TEXT);
    }

    public static void main(String[] args) {
        System.out.println(MostVisitTable.schema);
    }
}
